package cj.web.tel.service;
/*
 *  
 *  
*/
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cj.web.tel.domain.FloorInfor;
import cj.web.tel.dao.FloorInforDAO;

/**
 * 
 * @author 
 *
 */
@Service
public class FloorInforService{

	@Autowired
    private FloorInforDAO floorInforDAO;
	
	/**
	 * 查询
	 * @param floorInfor
	 * @return floorInforlis;size
	 */
	public Map query(FloorInfor floorInfor){
		Map rep = new HashMap();
		List<FloorInfor> floorInforlis = floorInforDAO.query(floorInfor);
		int size = floorInforDAO.querySize(floorInfor); 
		rep.put("floorInforlis", floorInforlis);
		rep.put("size", size);
		return rep;
    }
	
	public List<FloorInfor> queryByAll(){
		List<FloorInfor> objlis = floorInforDAO.queryByAll();
		return objlis;
    }
	
	public FloorInfor queryById(int id){
		FloorInfor obj = floorInforDAO.queryById(id);
		return obj;
    }
	
	public void create(FloorInfor floorInfor){
		floorInforDAO.create(floorInfor);
	}
	
	public void update(FloorInfor floorInfor){
		floorInforDAO.update(floorInfor);
	}
	
	public void deleteById(int id){
		floorInforDAO.deleteById(id);
	}
}